package com.hjm.project.accounts.virtualAccountDetail.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import com.hjm.project.accounts.virtualAccountDetail.mapper.VirtualAccountDetailMapper;
import com.hjm.project.accounts.virtualAccountDetail.domain.VirtualAccountDetail;
import com.hjm.project.accounts.virtualAccountDetail.service.IVirtualAccountDetailService;
import com.hjm.common.utils.text.Convert;

import javax.annotation.Resource;

/**
 * 虚拟账户记录Service业务层处理
 * 
 * @author maker-platform
 * @date 2022-03-16
 */
@Service
public class VirtualAccountDetailServiceImpl implements IVirtualAccountDetailService {
    @Resource
    private VirtualAccountDetailMapper virtualAccountDetailMapper;

    /**
     * 查询虚拟账户记录
     * 
     * @param id 虚拟账户记录ID
     * @return 虚拟账户记录
     */
    @Override
    public VirtualAccountDetail selectVirtualAccountDetailById(Integer id) {
        return virtualAccountDetailMapper.selectVirtualAccountDetailById(id);
    }

    /**
     * 查询虚拟账户记录列表
     * 
     * @param virtualAccountDetail 虚拟账户记录
     * @return 虚拟账户记录
     */
    @Override
    public List<VirtualAccountDetail> selectVirtualAccountDetailList(VirtualAccountDetail virtualAccountDetail) {
        return virtualAccountDetailMapper.selectVirtualAccountDetailList(virtualAccountDetail);
    }

    /**
     * 查询虚拟账户记录列表
     *
     * @param virtualAccountDetail 虚拟账户记录
     * @return 虚拟账户记录 一个结果
     */
    @Override
    public VirtualAccountDetail selectVirtualAccountDetailOne(VirtualAccountDetail virtualAccountDetail) {
        return virtualAccountDetailMapper.selectVirtualAccountDetailOne(virtualAccountDetail);
    }

    /**
     * 新增虚拟账户记录
     * 
     * @param virtualAccountDetail 虚拟账户记录
     * @return 结果
     */
    @Override
    public int insertVirtualAccountDetail(VirtualAccountDetail virtualAccountDetail) {
        return virtualAccountDetailMapper.insertVirtualAccountDetail(virtualAccountDetail);
    }

    /**
     * 修改虚拟账户记录
     * 
     * @param virtualAccountDetail 虚拟账户记录
     * @return 结果
     */
    @Override
    public int updateVirtualAccountDetail(VirtualAccountDetail virtualAccountDetail) {
        return virtualAccountDetailMapper.updateVirtualAccountDetail(virtualAccountDetail);
    }

    /**
     * 删除虚拟账户记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteVirtualAccountDetailByIds(String ids) {
        return virtualAccountDetailMapper.deleteVirtualAccountDetailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除虚拟账户记录信息
     * 
     * @param id 虚拟账户记录ID
     * @return 结果
     */
    @Override
    public int deleteVirtualAccountDetailById(Integer id) {
        return virtualAccountDetailMapper.deleteVirtualAccountDetailById(id);
    }
}
